package com.heima.wemedia.controller.v1;


import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmUser;
import com.heima.utils.thread.WmThreadLocalUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ping")
public class InterceptorTest {

    @GetMapping("/test")
    public ResponseResult test(){
        WmUser user = WmThreadLocalUtils.getUser();

        return ResponseResult.okResult(user);
    }
}
